<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>SmsForwarder 启动页</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            margin: 0;
            padding: 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }
        .container {
            text-align: center;
            padding: 30px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            backdrop-filter: blur(10px);
            box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
            max-width: 500px;
            width: 100%;
        }
        h1 {
            margin-bottom: 10px;
            font-size: 32px;
        }
        .subtitle {
            margin-bottom: 30px;
            opacity: 0.9;
            font-size: 16px;
        }
        .btn-group {
            display: flex;
            flex-direction: column;
            gap: 15px;
            margin-bottom: 30px;
        }
        .btn {
            display: block;
            padding: 15px 30px;
            font-size: 16px;
            color: white;
            background: rgba(255, 255, 255, 0.2);
            border: 2px solid white;
            border-radius: 50px;
            text-decoration: none;
            transition: all 0.3s ease;
            cursor: pointer;
        }
        .btn:hover {
            background: white;
            color: #667eea;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        }
        .btn-primary {
            background: rgba(255, 255, 255, 0.3);
            font-weight: bold;
        }
        .info {
            margin-top: 20px;
            font-size: 13px;
            opacity: 0.8;
            text-align: left;
        }
        .code {
            background: rgba(0, 0, 0, 0.3);
            padding: 8px 12px;
            border-radius: 5px;
            margin: 8px 0;
            font-family: monospace;
            font-size: 12px;
            word-break: break-all;
        }
        .status {
            margin-top: 20px;
            padding: 10px;
            border-radius: 5px;
            background: rgba(0, 0, 0, 0.2);
            font-size: 14px;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>🚀 SmsForwarder</h1>
        <p class="subtitle">选择一种方式启动应用</p>
        
        <div class="btn-group">
            <a href="smsforwarder://open" class="btn btn-primary" onclick="trackClick('scheme1')">
                方式 1: smsforwarder://
            </a>
            <a href="smsf://open" class="btn" onclick="trackClick('scheme2')">
                方式 2: smsf://
            </a>
            <a href="https://smsforwarder.app/open" class="btn" onclick="trackClick('deeplink')">
                方式 3: Deep Link
            </a>
            <button class="btn" onclick="openWithIntent()">
                方式 4: Intent (Android)
            </button>
        </div>
        
        <div class="info">
            <p><strong>支持的 URL Scheme:</strong></p>
            <div class="code">smsforwarder://open</div>
            <div class="code">smsf://open</div>
            <div class="code">https://smsforwarder.app/open</div>
            
            <p style="margin-top: 15px;"><strong>使用建议：</strong></p>
            <p style="font-size: 12px; line-height: 1.6;">
                • 将此页面添加到浏览器书签<br>
                • 或保存链接到备忘录<br>
                • Chrome 浏览器兼容性最好<br>
                • 如果无效，请重新安装应用
            </p>
        </div>
        
        <div id="status" class="status" style="display: none;"></div>
    </div>
    
    <script>
        function trackClick(method) {
            showStatus('正在尝试启动应用 (' + method + ')...');
            setTimeout(() => {
                showStatus('如果应用未启动，请尝试其他方式');
            }, 2000);
        }
        
        function openWithIntent() {
            showStatus('正在尝试通过 Intent 启动...');
            // 尝试多种方式
            const urls = [
                'intent://open#Intent;scheme=smsforwarder;end',
                'smsforwarder://open',
                'smsf://open'
            ];
            
            urls.forEach((url, index) => {
                setTimeout(() => {
                    window.location.href = url;
                }, index * 500);
            });
        }
        
        function showStatus(message) {
            const status = document.getElementById('status');
            status.textContent = message;
            status.style.display = 'block';
        }
        
        // 检测是否在 Android 设备上
        if (/Android/i.test(navigator.userAgent)) {
            showStatus('✓ 检测到 Android 设备');
        } else {
            showStatus('⚠ 此功能仅支持 Android 设备');
        }
    </script>
</body>
</html>
